<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.List"%>
<%@ page import="activity.Activity_supply"%>
<%@ page import="javax.jdo.PersistenceManager" %>
<%@ page import="javax.jdo.Query" %>
<%@ page import="activity.PMF" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>上架總覽</title>
</head>
<body>

<table border="1">
<%
PersistenceManager pm = PMF.get().getPersistenceManager();
Query query = pm.newQuery(Activity_supply.class);
//query.setFilter("inventory >= reorderPoint"); //DOES NOT WORK
//query.setOrdering("hireDate desc");
//query.declareParameters("String lastNameParam");

try {
    List<Activity_supply> results = (List<Activity_supply>) query.execute();

%>
<tr><td>ID</td><td>提供商家名稱</td><td>提供活動名稱</td><td>提供活動點數</td><td>集點開始日期</td><td>集點結束日期</td><td>描述</td></tr>
<%
        for (Activity_supply act : results) {
        	
%>
				
				<tr>
				<td><%=act.getActID_s() %></td>
				
				<td><%=act.getActShop_s() %></td>
				<td><%=act.getActName_s() %></td>
				<td><%=act.getActPoint_s() %></td>
				<td><%=act.getActStart_s() %></td>
				<td><%=act.getActEnd_s() %></td>
				
				
				<td><%=act.getActContent_s()%></td>
				</tr>
<% 
        	
        }	
		
    		
}//try
finally {
    query.closeAll();
}

%>

</table>
<a href="createPoint_sup.jsp">回上頁</a>
</body>
</html>